﻿using System;
using System.Collections.Generic;
using UFrame.Manage;
using UnityEngine;

public class GameManage : BaseGameManage<GameManage>
{
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
    static void RuntimeInit()
    {
        if (!Debug.isDebugBuild || FindObjectOfType<GameManage>() != null)
            return;
        GameManage.Instance.GameState = 0;
        GameManage.Instance.DevState = DevelopState.DEBUG;
    }
}

public class AgentContext<Context, IAgent, Agent> : BaseAgentContextWithManage<Context, IAgent, Agent>
    where Context : BaseAgentContext<Context, IAgent, Agent>, new()
    where Agent : IAgent, new()
{
    protected override IGameManage Manage => GameManage.Instance;
}

public class ManagerContext<Context, Manager> : BaseAgentContextWithManage<Context, Manager> where Context : BaseAgentContextWithManage<Context, Manager>, new() where Manager : new()
{
    protected override IGameManage Manage => GameManage.Instance;
}